<template>
	<div>
		<van-row style="width: 100%;height: 8vh;line-height: 8vh;">
			<van-col span="3">
				<van-icon name="arrow-left" size="25" style="margin-top: 15px;" @click="backhead" />
			</van-col>
			<van-col span="16" style="margin-left: 2%;height: 8vh;">
				{{this.searchmenu.menuname}}
			</van-col>
		</van-row>
		<van-row style="margin-top: 1vh;">
					<van-col style="display: flex;flex-wrap: wrap;">
						<van-row style="width: 48vw;margin-left: 1%; height: 37vh;border-radius: 10px;"
							v-for="(item,index) in searchmenus" :key="index">
							<van-col span="24" >
								<van-row style="height: 23vh;">
									<van-image :src="url+item.original_img" :lazy-load="true" width="70%" height="100%">
									</van-image>
								</van-row>
								<van-row
									style="height: 4vh;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-weight: 600;"
									class="ccc" @click="detailenter(item.goods_id)">
									{{item.goods_name}}
								</van-row>
								<van-row style="height: 6vh;color: #ccc;font-size: 14px; display: -webkit-box;
		　　-webkit-box-orient: vertical;
		　　-webkit-line-clamp: 2;
		　　overflow: hidden;line-height: 3vh;" >
									{{item.goods_name}}
								</van-row>
								<van-row class="aaa" style="height: 3vh;text-align: left;color: red;font-weight: 600;">
									￥{{item.market_price}}
								</van-row>
							</van-col>
						</van-row>
		
					</van-col>
				</van-row>
	</div>
</template>

<script>
	import {mapGetters} from 'vuex'
	export default {
		data() {
			return {
				value: '',
				searchmenu:[],
				url: 'https://img.9lele.com',
				searchmenus:[]
			}
		},
		computed: {
			...mapGetters([
				'cartmenus'
			])
		},
		created() {
			console.log(this.$route.query)
			this.searchmenu = this.$route.query
			var id = this.$route.query.id
			this.$store.dispatch("vuexCartmenu", id)
				.then(e => {
					console.log(e)
					this.searchmenus = e.data.data
				})
		},
		methods: {
			backhead() {
				this.$router.push({
					path: '/'
				})
			}
		}
	}
</script>

<style>
</style>
